package Review2;

public class Test04 {
	public void replaceBlank(char[] ch){
		if(ch==null||ch.length==0){
			return;
		}
		int blank = 0;
		for(int i=0;i<ch.length;i++){
			if(ch[i]==' '){
				blank++;
			}
		}
		char[] ch2 = new char[ch.length+2*blank];
		int j=0;
		int k=0;
		while(j<ch.length){
			if(ch[j]==' '){
				ch2[k++]='2';
				ch2[k++]='0';
				ch2[k++]='%';
			}
			else{
				ch2[k++]=ch2[j];
			}
			j++;
		}
		
	}

}
